//+--------------------------------------------------------------------------------
//| Copyright (c) 2012 - 2013 ### an.vuongngocduy
//| This file is a part of Compact Game Engine (CGE)
//+--------------------------------------------------------------------------------
#ifndef __CGE_ENGINE_H__
#define __CGE_ENGINE_H__

#include "cgeCommons.h"
#include "cgeEnums.h"
#include "cgeCanvas.h"
#include "cgeSingleton.h"

using namespace cge::gfx;

namespace cge
{
	typedef b8 (*SysMessageDispatchFunc)(void*);

	class Engine : public Singleton<Engine>
	{
	public:
		//! Locked default constructor
		Engine();


		//! Destructor
		~Engine();
	
		
		//! Create a new canvas with specified renderer
		Canvas* CreateCanvas(ERendererDriver driver);

		
		//! Start the engine
		void Run();


	private:
		Canvas* mCanvas;
		SysMessageDispatchFunc mSysMsgDistribute;
	};
}

#endif//__CGE_ENGINE_H__